<template>
  <div>
    <div class="search">
      <el-input
        placeholder="请输入姓名,如果不更新,点击右侧搜索按钮"
        v-model="input"
        clearable
      ></el-input>
      <el-button
        slot="append"
        type="primary"
        plain
        icon="el-icon-search"
      ></el-button>
      <el-button type="primary">添加项目</el-button>
    </div>
    <div class="select">
      选择班级：
      <el-select v-model="value" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        ></el-option>
      </el-select>
    </div>
    <el-table
      :data="tableData"
      border
      style="width: 100%"
      :default-sort="{ prop: 'date', order: 'descending' }"
    >
      <el-table-column prop="date" label="头像" width="100"></el-table-column>
      <el-table-column prop="date" label="姓名" width="100"></el-table-column>
      <el-table-column prop="name" label="学历"></el-table-column>
      <el-table-column prop="date" label="班级"></el-table-column>
      <el-table-column prop="name" label="项目"></el-table-column>
      <el-table-column prop="name" label="创建时间"></el-table-column>
      <el-table-column prop="name" label="操作">
        <el-button type="primary" size="mini" icon="el-icon-view">
          查看
        </el-button>
        <el-button type="primary" size="mini" icon="el-icon-edit">
          编辑
        </el-button>
        <el-button type="danger" size="mini" icon="el-icon-delete">
          删除
        </el-button>
      </el-table-column>
    </el-table>
    <el-pagination
      background
      layout="prev, pager, next"
      :total="100"
    ></el-pagination>
  </div>
</template>

<script>
export default {
  meta: {
    title: "xyxmgl",
  },
  data() {
    return {
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
        },
      ],
    };
  },
};
</script>
<style lang="less" scoped>
.search {
  margin: 20px 0;
}
.select {
  margin-bottom: 22px;
}
.el-input {
  width: 250px;
}
/deep/ .cell {
  text-align: center;
}
.el-pagination {
  margin-top: 20px;
  text-align: center;
}
</style>
